package com.atguigu.bridge;

/**
 * @program: design-patterns
 * @author: yangshen
 * @description: 桥接类
 * @create: 2022-02-16 10:30
 **/
public abstract class Phone {
    /**
     * 聚合品牌
     */
    private final Brand brand;

    public Phone(Brand brand) {
        this.brand = brand;
    }

    protected void open(){
        this.brand.call();
    }

    protected void close(){
        this.brand.close();
    }

    protected void call(){
        this.brand.call();
    }
}
